<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/bootstrap.min.css" type='text/css' rel='stylesheet'>
<title>Lista de Compras Efetuadas</title>
</head>

<body>
	<div class="container">


		<div class="row-fluid">
			<div class="span8">
				<div class="row">
				<p>
					<a href="/">Home</a> |
					<a href="/listar-produtos/">Produtos</a> |
					<a href="/cadastrar-produto.html">Add Produto</a>
				<p>


				<h1>Compras Efetuadas</h1>

				</div>
				<div class="row">

					<table class="table">

						<thead>
							<tr>
								<th>Data</th>
								<th>Total</th>
							</tr>
						</thead>


						<c:forEach var="compra" items="${compras}">

							<tr>
								<td><f:formatDate
											value="${compra.data}" type="date" />
								</a></td>
								<td>${compra.total}</td>
								<td><a href="/load-compra/?id=${compra.id}">detalhe</a><td>
							</tr>

						</c:forEach>


					</table>
				</div>

			</div>

		</div>

	</div>

</body>

</html>